{extend name="base"/}

{block name="content"}
<form id="userform" class="layui-form" style="width:80%;" enctype="multipart/form-data">
	<div class="layui-form-item">
		<label class="layui-form-label">用户</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input dataIntegral" name="name" value="{$data.name}"   placeholder="请输入">
			<input type="hidden" name="id" value="{$data.id}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">密码</label>
		<div class="layui-input-block">
			<input type="password" class="layui-input dataIntegral" name="password" value=""   placeholder="（为空默认原密码）请输入6-12位">
			<input type="hidden" name="id" value="{$data.id}" >
		</div>
	</div>
	{if $data.id==1}
		<!-- 默认不让修改	 -->
	{else}
	<div class="layui-form-item">
		<label class="layui-form-label">权限角色</label>
		<div class="layui-input-block">
			<select name="role_id" lay-verify="">
					{foreach $list as $key=>$vo } 
					<option value="{$vo.id}" {$vo.id==$data.role_id ? 'selected' : ''}>{$vo.name}</option>
					{/foreach}
			  </select>     
		</div>
	</div>
	{/if}
	{:token()}
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="layui-btn" lay-submit="" lay-filter="editadmin">立即提交</button>
			<!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
		</div>
	</div>
</form>
	
{/block}
{block name="js"}
	<script type="text/javascript" src="__ADMIN__/js/allUsers.js"></script>
{/block}